<% for i in @contacts %>
<input type="checkbox" name="email[]" id="email_<%= i %>" value="<%= i %>" /><%= i %><br>
<% end %>